Autogenerated HTML docs for v1.9.1-429-g25d1a
diff --git a/git-rev-parse.html b/git-rev-parse.html index 0b8d912..72892e7 100644 --- a/git-rev-parse.html +++ b/git-rev-parse.html
@@ -1642,12 +1642,12 @@ <h3 id="_input_format">Input Format</h3> <div class="paragraph"><p><em>git rev-parse --parseopt</em> input format is fully text based. It has two parts, separated by a line that contains only <tt>--</tt>. The lines before the separator -(should be more than one) are used for the usage. +(should be one or more) are used for the usage. The lines after the separator describe the options.</p></div> <div class="paragraph"><p>Each line of options has this format:</p></div> <div class="listingblock"> <div class="content"> -<pre><tt><opt_spec><flags>* SP+ help LF</tt></pre> +<pre><tt><opt_spec><flags>*<arg_hint>? SP+ help LF</tt></pre> </div></div> <div class="dlist"><dl> <dt class="hdlist1"> @@ -1695,6 +1695,17 @@ </li> </ul></div> </dd> +<dt class="hdlist1"> +<tt><arg_hint></tt> +</dt> +<dd> +<p> + <tt><arg_hint></tt>, if specified, is used as a name of the argument in the + help output, for options that take arguments. <tt><arg_hint></tt> is + terminated by the first whitespace. When you need to use space in the + argument hint use dash instead. +</p> +</dd> </dl></div> <div class="paragraph"><p>The remainder of the line, after stripping the spaces, is used as the help associated to the option.</p></div> @@ -1715,6 +1726,8 @@ foo some nifty option --foo bar= some cool option --bar with an argument +baz=arg another cool option --baz with a named argument +qux?path qux may take a path argument but has meaning by itself An option group Header C? option C with an optional argument" @@ -1722,6 +1735,26 @@ eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"</tt></pre> </div></div> </div> +<div class="sect2"> +<h3 id="_usage_text">Usage text</h3> +<div class="paragraph"><p>When <tt>"$@"</tt> is <tt>-h</tt> or <tt>--help</tt> in the above example, the following +usage text would be shown:</p></div> +<div class="listingblock"> +<div class="content"> +<pre><tt>usage: some-command [options] <args>... + + some-command does foo and bar! + + -h, --help show the help + --foo some nifty option --foo + --bar ... some cool option --bar with an argument + --bar <arg> another cool option --baz with a named argument + --qux[=<path>] qux may take a path argument but has meaning by itself + +An option group Header + -C[...] option C with an optional argument</tt></pre> +</div></div> +</div> </div> </div> <div class="sect1"> @@ -1797,7 +1830,7 @@ <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> -Last updated 2013-12-06 15:42:42 PST +Last updated 2014-03-31 17:26:22 PDT </div> </div> </body>